<template>
  <el-tabs
    v-model="clusterTable"
    type="border-card"
    style="box-shadow: none; margin-top: 1rem"
  >
    <el-tab-pane
      label="集群基础配置"
      name="0"
    >
      <ClusterBasic v-if="clusterTable == '0'" />
    </el-tab-pane>
    <el-tab-pane
      v-if="envMode !== 'DEV'"
      label="同步规则"
      name="1"
    >
      <AddSyncRules v-if="clusterTable == '1'" />
    </el-tab-pane>
    <el-tab-pane
      label="表同步规则"
      name="tbSyncRules"
    >
      <TableSyncRules v-if="clusterTable == 'tbSyncRules'" />
    </el-tab-pane>
    <el-tab-pane
      v-if="envMode !== 'DEV'"
      label="分区字段匹配表"
      name="2"
    >
      <AddRuleFieldTable v-if="clusterTable == '2'" />
    </el-tab-pane>

    <el-tab-pane
      v-if="envMode !== 'DEV'"
      label="全量稽核黑名单"
      name="3"
    >
      <FullAuditBlacklist v-if="clusterTable == '3'" />
    </el-tab-pane>

    <el-tab-pane
      v-if="envMode !== 'DEV'"
      label="全量稽核白名单"
      name="4"
    >
      <fullAuditWhitelist v-if="clusterTable == '4'" />
    </el-tab-pane>

    <el-tab-pane
      label="冷备Agent信息"
      name="5"
    >
      <AgentInfo v-if="clusterTable == '5'" />
    </el-tab-pane>

    <el-tab-pane
      label="冷备Nas信息"
      name="6"
    >
      <CBNasInfo v-if="clusterTable == '6'" />
    </el-tab-pane>

    <el-tab-pane
      label="冷备NasAgent配置"
      name="7"
    >
      <NasAgent v-if="clusterTable == '7'" />
    </el-tab-pane>
    <el-tab-pane
      label="冷备NasDB配置"
      name="8"
    >
      <NasDB v-if="clusterTable == '8'" />
    </el-tab-pane>

    <!--<el-tab-pane
        label="备份配置"
        name="8"
      >
        <backupConfig v-if="clusterTable == '8'" />
      </el-tab-pane>  -->
  </el-tabs>
</template>

<script>
import ClusterBasic from './ClusterBasic'
import AddSyncRules from './AddSyncRules'
import AddRuleFieldTable from './AddRuleFieldTable'
import FullAuditBlacklist from './FullAuditBlacklist'
import fullAuditWhitelist from './fullAuditWhiteList'
import AgentInfo from './agentInfo.vue'
import CBNasInfo from './cbNasInfo/index.vue'
import NasAgent from './nasAgent/index.vue'
import NasDB from './nasDB/index.vue'
import TableSyncRules from './tableSyncRules/index.vue'

export default {
  components: {
    ClusterBasic,
    AddSyncRules,
    AddRuleFieldTable,
    FullAuditBlacklist,
    fullAuditWhitelist,
    AgentInfo,
    CBNasInfo,
    NasAgent,
    NasDB,
    TableSyncRules
  },
  data() {
    return {
      clusterTable: '0',
      envMode: process.env.VUE_APP_ENV
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
